<?php
/**
 * Created by IntelliJ IDEA.
 * User: peya
 * Date: 14.12.11
 * Time: 12:05
 * To change this template use File | Settings | File Templates.
 */
 
class Admin_Form_Lokace extends Zend_Form
{

    public function init()
    {
        $this->setName('lokace');

        $id_lokace = new Zend_Form_Element_Hidden('id_lokace');
        $id_lokace->addFilter('Int');

        $mesto = new Zend_Form_Element_Text('mesto');
        $mesto->setLabel('Město')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');

        $ulice = new Zend_Form_Element_Text('ulice');
        $ulice->setLabel('Ulice')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');

        $odeslat = new Zend_Form_Element_Submit('submit');
        $odeslat->setAttrib('id_lokace', 'submitbutton');

        $this->addElements(array($id_lokace, $mesto, $ulice, $odeslat));
    }
}